import { i18n } from 'boot/i18n'
import { computed } from 'vue'

/**
 * 常用枚举值
 */
// 是否
export const yesOrNo = computed(() => {
  return [{
    label: `${i18n.t('Yes')}`, value: '1', color: 'positive'
  }, {
    label: `${i18n.t('No')}`, value: '0', color: 'negative'
  }]
})

// 成功失败
export const successOrFail = computed(() => {
  return [{
    label: `${i18n.t('Success')}`, value: '1', color: 'positive'
  }, {
    label: `${i18n.t('Fail')}`, value: '0', color: 'negative'
  }]
})

// 启用禁用
export const enableOrDisable = computed(() => {
  return [{
    label: `${i18n.t('Enable')}`, value: '1', color: 'positive'
  }, {
    label: `${i18n.t('Disable')}`, value: '0', color: 'grey-4'
  }]
})

// 绑定解绑
export const bindOrUnbind = computed(() => {
  return [{
    label: `${i18n.t('Binding')}`, value: '1', color: 'positive'
  }, {
    label: `${i18n.t('Unbind')}`, value: '0', color: 'negative'
  }]
})

// 设备类型
export const AGVTypes = computed(() => {
  return [{
    label: `${i18n.t('AGVCore.AGVTypeTip1')}`, value: '10'
  }, {
    label: `${i18n.t('AGVCore.AGVTypeTip4')}`, value: '20'
  }, {
    label: `${i18n.t('AGVCore.AGVTypeTip3')}`, value: '30'
  }, {
    label: `${i18n.t('AGVCore.AGVTypeTip2')}`, value: '40'
  }, {
    label: `${i18n.t('AGVCore.AGVTypeTip5')}`, value: '50'
  }, {
    label: `${i18n.t('AGVCore.AGVTypeTip6')}`, value: '60'
  }]
})

// 设备导航类型
export const NavigationTypes = computed(() => {
  return [{
    label: `${i18n.t('AGVCore.NavigationTypeTip1')}`, value: '0'
  }, {
    label: `${i18n.t('AGVCore.NavigationTypeTip2')}`, value: '1'
  }, {
    label: `${i18n.t('AGVCore.NavigationTypeTip3')}`, value: '2'
  }, {
    label: `${i18n.t('AGVCore.NavigationTypeTip4')}`, value: '3'
  }, {
    label: `${i18n.t('AGVCore.NavigationTypeTip5')}`, value: '4'
  }]
})

// 设备状态及对应颜色
export const AGVStatus = computed(() => {
  return [{
    color: 'light-blue-4', label: `${i18n.t('AGVCore.AGVStatusTip2')}`, value: 'IDLE'
  }, {
    color: 'green-4', label: `${i18n.t('AGVCore.AGVStatusTip4')}`, value: 'RUNNING'
  }, {
    color: 'amber-4', label: `${i18n.t('AGVCore.AGVStatusTip1')}`, value: 'CHARGING'
  }, {
    color: 'red-4', label: `${i18n.t('AGVCore.AGVStatusTip6')}`, value: 'EMERGENCY'
  }, {
    color: 'grey-4', label: `${i18n.t('AGVCore.AGVStatusTip5')}`, value: 'OFFLINE'
  }, {
    color: 'transparent', label: `${i18n.t('AGVCore.AGVStatusTip8')}`, value: 'TOTALS'
  }]
})

// 告警类型
export const alarmTypes = computed(() => {
  return [{
    label: `${i18n.t('DataAnalysis.AlarmTypeTip11')}`, value: '11'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip12')}`, value: '12'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip13')}`, value: '13'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip14')}`, value: '14'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip16')}`, value: '16'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip17')}`, value: '17'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip18')}`, value: '18'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip24')}`, value: '24'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip27')}`, value: '27'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip28')}`, value: '28'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip40')}`, value: '40'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTip41')}`, value: '41'
  }, {
    label: `${i18n.t('DataAnalysis.AlarmTypeTips')}`, value: 'other'
  }]
})

// 任务状态
export const taskStatus = computed(() => {
  return [{
    label: `${i18n.t('TaskCore.TaskStatusTip1')}`, value: '1', color: 'yellow-4'
  }, {
    label: `${i18n.t('TaskCore.TaskStatusTip2')}`, value: '2', color: 'light-green-4'
  }, {
    label: `${i18n.t('TaskCore.TaskStatusTip3')}`, value: '3', color: 'lime-4'
  }, {
    label: `${i18n.t('TaskCore.TaskStatusTip4')}`, value: '4', color: 'green-4'
  }, {
    label: `${i18n.t('TaskCore.TaskStatusTip5')}`, value: '5', color: 'teal-4'
  }, {
    label: `${i18n.t('TaskCore.TaskStatusTip6')}`, value: '6', color: 'positive'
  }, {
    label: `${i18n.t('TaskCore.TaskStatusTip7')}`, value: '7', color: 'negative'
  }, {
    label: `${i18n.t('TaskCore.TaskStatusTip8')}`, value: '8', color: 'grey-4'
  }, {
    label: `${i18n.t('TaskCore.TaskStatusTip9')}`, value: '9', color: 'red'
  }]
})

// 任务类别
export const taskCategory = computed(() => {
  return [{
    label: `${i18n.t('TaskCore.TaskCategoryTip1')}`, value: '0'
  }, {
    label: `${i18n.t('TaskCore.TaskCategoryTip2')}`, value: '1'
  }, {
    label: `${i18n.t('TaskCore.TaskCategoryTip3')}`, value: '2'
  }, {
    label: `${i18n.t('TaskCore.TaskCategoryTip4')}`, value: '3'
  }, {
    label: `${i18n.t('TaskCore.TaskCategoryTip5')}`, value: '4'
  }]
})